package com.sky.mapper;

import com.sky.annotation.AutoFill;
import com.sky.dto.DishDTO;
import com.sky.dto.DishPageQueryDTO;
import com.sky.entity.Dish;
import com.sky.entity.DishFlavor;
import com.sky.enumeration.OperationType;
import com.sky.vo.DishVO;
import org.apache.ibatis.annotations.Mapper;

import java.util.List;

@Mapper
public interface DishMapper {


    List<Dish> select(Dish dish);

    List<DishVO> page(DishPageQueryDTO dishPageQueryDTO);

    @AutoFill(value = OperationType.INSERT)
    void insert(Dish dish);

    void insertDishFlavor(List<DishFlavor> flavors);

    String getCategoryNameById(Long id);

    void delete(List<Long> ids);

    void deleteFlavor(List<Long> ids);

    @AutoFill(value = OperationType.UPDATE)
    void update(Dish dish);

    List<DishFlavor> getDishFlavorByDishId(Long id);

    Dish getDishById(Long id);
}
